<template>
	<view>
		<yt-order-list :orderList="orderList" @Transfer="Transfer" @jieOrder="jieOrder" @callUser="callUser"></yt-order-list>
	</view>
</template>

<script>
	export default {
	        data() {
	            return {
	                orderList: [
					
					]
	            }
	        },
			onLoad() {
				uni.request({
				    url: 'http://localhost:8080/purchaseOrderDetails/getBySupplierId', 
					data: {
						supplierId: uni.getStorageSync('SupplierId'),
						status : 0
						},
				    success: (res) => {
						this.orderList = res.data.data
				    }
				});
			},
			onPullDownRefresh() {
			   uni.reLaunch({
			        url: '/pages/deliverNo/deliverNo' // 替换为当前页面的路径
			      });
			  },
	        methods: {
	            /**
	             * @method Transfer
	             * 订单转派
	             * @param {Object} id
	             */
	            Transfer(id){
	                console.log("转派",id);
	            },
	            /**
	             * @method jieOrder
	             * 接单
	             * @param {Object} id
	             */
	            jieOrder(id){
	                console.log("接单",id);
	            },
	            /**
	             * @method callUser
	             * 联系
	             * @param {Object} id
	             */
	            callUser(id){
	                console.log("联系",id);
	            }
	        }
	    }
</script>

<style lang="scss">

</style>
